package com.example.springrabbitmq.listener;

import com.example.springrabbitmq.constant.Constants;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

//@Component
public class WorkListener1 {
    @RabbitListener(queues = Constants.WORK_QUEUE)
    public void queueListener1(Message message) {
        System.out.println("listener1 从队列 " + Constants.WORK_QUEUE +" 中接收到消息：" + message);
    }
}